package com.shujia.controller;

import com.shujia.bean.Student;
import com.shujia.service.StudentService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SutdentController {

    private StudentService studentService = new StudentService();

    /**
     * 通过学号查询学生基本信息接口
     */

    @GetMapping("/queryStudentById")
    public Student queryStudentById(String id) {

        long start = System.currentTimeMillis();

        Student student = studentService.queryStudentById(id);

        long end = System.currentTimeMillis();

        System.out.println(end - start);

        return student;


    }
}
